function getCookie(strName) {
    var iNameLength = strName.length;

    var strCookies =  decodeURIComponent(document.cookie);
    var iCookiesLength = strCookies.length;

    var i = 0;
    var iEnd;

    while (i < iCookiesLength) {
        var j = i + iNameLength;
        if (strCookies.substring(i, j) == strName) {
            iEnd = strCookies.indexOf(";", j);
            if (iEnd == -1) {
                iEnd = strCookies.length;
            }
            return strCookies.substring(j + 2, iEnd - 1);
        }
        i++;
    }
    return "";
}
/*****************************************************************************/
function displayPopup(strMessage, strAlign, iTime) {
    
    /* display pop-up message */
    var divPopup = document.createElement("div");
    divPopup.innerHTML = strMessage;

    divPopup.setAttribute("id", "divPopup");
    divPopup.style.zIndex = "2";
    divPopup.style.left = "0";divPopup.style.top = "0";
    divPopup.style.width = "960px";
    divPopup.style.marginLeft = "auto"; divPopup.style.marginRight = "auto";
    divPopup.style.color = "#005073";
    divPopup.style.textAlign = strAlign;
    divPopup.style.backgroundColor = "#FDEBCF";
    divPopup.style.padding = "4px";
    divPopup.style.display = "block";
        
    document.body.insertBefore(divPopup, document.getElementById("divTitle"));
        
    //display for 2 sec
    setTimeout("hidePopup(document.getElementById('divPopup'));", iTime);
}
/*****************************************************************************/
function hidePopup(popup) {
    document.body.removeChild(popup);
}
/*****************************************************************************/